package part_2;

public class TestPump {

	public static void main(String[] args) throws InterruptedException {
		//Building pumps ...
		GasPump pump1 = new GasPump();
		GasPump pump2 = new GasPump(12000, false, 1.54);
		GasPump pump3 = new GasPump(5000, true, 1.1);
		pump1.status();
		pump2.status();
		pump3.status();
		System.out.println();
		sleep();
		
		//test request method
		pump1.requestGas(500);
		pump2.requestGas(15000);
		pump3.requestGas(1794);
		sleep();
		
		//test refill
		pump2.refill();
		sleep();
		
		// see if refill did refill
		pump2.requestGas(2000);
		sleep();
		
		//check equality
		pump1.equals(pump2);
		pump1.equals(pump3);
	}
	
	//puts the tread to sleep for half a second ...
	private static void sleep() throws InterruptedException {
		Thread.sleep(500);
	}

}
